﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Configuration;
using System.Windows.Forms;
using System.Xml;
using AppAcc.Models;

namespace AppAcc.Models
{
    class AppAccContext:DbContext
    {

        //public AppAccContext()
        //    : base(strconn())
        //{
        //    //this.base("name=PhanMenKeToanEntities");
        //}
        //private static string strconn()
        //{
        //    var xmldoc = new XmlDataDocument();
        //    //XmlDataDocument xmldoc = new XmlDataDocument();
        //    XmlNodeList xmlnode;
        //    var fs = new FileStream("test-doc.xml", FileMode.Open, FileAccess.Read);
        //    xmldoc.Load(fs);
        //    xmlnode = xmldoc.GetElementsByTagName("appSettings");
        //    xmlnode[0].ChildNodes.Item(0).InnerText.Trim();
        //    var ContextName = xmlnode[0].ChildNodes.Item(0).Attributes[0].Value;
        //    return ContextName;
        //}
        //protected override void OnModelCreating(DbModelBuilder modelBuilder)
        //{
        //    // Configure Code First to ignore PluralizingTableName convention 
        //    // If you keep this convention, the generated tables  
        //    // will have pluralized names. 
        //    modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        //} 
        //public virtual DbSet<ChungTuChiTiet> ChungTuChiTiets { get; set; }
        //public virtual DbSet<ChungTu> ChungTus { get; set; }
        //public virtual DbSet<DoiTac> DoiTacs { get; set; }
        //public virtual DbSet<DongTienHoachToan> DongTienHoachToans { get; set; }
        //public virtual DbSet<DonViTinh> DonViTinhs { get; set; }
        //public virtual DbSet<HangHoa> HangHoas { get; set; }
        //public virtual DbSet<KhoHang> KhoHangs { get; set; }
        //public virtual DbSet<LoaiHang> LoaiHangs { get; set; }
        //public virtual DbSet<LoaiKhoHang> LoaiKhoHangs { get; set; }
        //public virtual DbSet<LoaiTaiKhoan> LoaiTaiKhoans { get; set; }
        //public virtual DbSet<NhanVien> NhanViens { get; set; }
        //public virtual DbSet<NhomDoiTac> NhomDoiTacs { get; set; }
        //public virtual DbSet<NhomTaiSan> NhomTaiSans { get; set; }
        //public virtual DbSet<NhomThueHangHoa> NhomThueHangHoas { get; set; }
        //public virtual DbSet<PhanQuyen> PhanQuyens { get; set; }
        //public virtual DbSet<PhongBan> PhongBans { get; set; }
        //public virtual DbSet<SoDuDoiTac> SoDuDoiTacs { get; set; }
        //public virtual DbSet<SoDuTaiKhoan> SoDuTaiKhoans { get; set; }
        //public virtual DbSet<TaiKhoan> TaiKhoans { get; set; }
        //public virtual DbSet<TaiSan> TaiSans { get; set; }
        //public virtual DbSet<ThongTinDonViKeToan> ThongTinDonViKeToans { get; set; }
        //public virtual DbSet<UserAccount> UserAccounts { get; set; }
    }
}
